let shell = require('shelljs')
module.exports = function () {
    return new Promise((resolve, reject) => {
        shell.cd('/root/backend')
        shell.exec('git pull')
        shell.exec('docker build -t backend ./')
        shell.exec('docker stop backend')
        shell.exec('docker rm backend')
        shell.exec('docker run --name backend -tid -p 3000:3000 backend')
        resolve()
    })
}
